<script>
import {defineComponent} from 'vue'

export default defineComponent({
    name: "myDefine",
    data() {
        return {
            color: 'green',
            flag: false,
            text:'',
        }
    },
    directives: {
        color1(el) {
            console.log(el)
        },
        color2: {
            bind() {},
            update() {}
        }
    },
    methods: {

    }
})
</script>

<template>
    <div>

        <div v-color="'red'">自定义指令</div>
        <div v-color="color">自定义指令</div>
        <input v-color="color" v-model="text">

<!--        <div v-color1>自定义指令</div>-->


    </div>
</template>
<script>

</script>
<style scoped lang="less">
</style>